home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
swagg_m.zip
/
MEMORY.SWG
/
0006_FREEMEM1.PAS.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-05-28
|
390b
|
19 lines
{
Does anyone have any routines to find the available memory outside of the
heap ?
}
Function GetFreeMemory : LongInt;
Var
Regs : Registers;
begin
Regs.AH := $48;
Regs.BX := $FFFF;
Intr($21,Regs);
GetFreeMemory := LongInt(Regs.BX)*16;
end;
{
This Procedure tries to allocate 1MB memory (what's impossible).
Dos will give you the maximum of free memory back.
}